package sqlexplorer.ui.views;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.part.ViewPart;

public class QueryView extends ViewPart {

	public static final String ID = "sqlexplorer.ui.views.queryview";
	private Text m_txtQuery;
	@Override
	public void createPartControl(Composite parent) {
		GridLayout layout = new GridLayout();
		layout.numColumns = 1;
		parent.setLayout(layout);
		
		m_txtQuery = new Text(parent, SWT.MULTI);
		m_txtQuery.setLayoutData(new GridData(GridData.FILL_BOTH));
	}

	@Override
	public void setFocus() {
		m_txtQuery.setFocus();
	}

	public String getQuery() {
		return m_txtQuery.getText();
	}
}
